<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-bind:color="prop.color" v-bind:font="prop.font" v-bind:background="prop.background">test</div>

        <!-- 
        批量传递：
            — 将需要传递的对象直接展开传递给v-bind
            — 不能简写
         -->
        <p v-bind="prop"></p>
    </div>


    <script>
        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    prop: {
                        color: "red",
                        font: "weight",
                        background: "yellow",
                    }
                }
            },
        })
    </script>
</body>

</html>